{extend name="public/base"/}
{block name="body"}
<div class="main-box no-header clearfix">
    <header class="main-box-header clearfix">
        <div class="pull-left">
            <h2>{$meta_title}（{$count}）</h2>
        </div>

    </header>
    <div class="main-box-body clearfix">
        {$Think.get.name}
        <div class="row">
            <form method="get">
                <div class="col-sm-12 col-md-4 col-lg-2">
                    <input type="text" class="form-control" name="username" value="{$Think.get.username}" placeholder="用户名">
                </div>
                <div class="col-sm-12 col-md-4 col-lg-2">
                    <input type="text" class="form-control" name="tel" value="{$Think.get.tel}" placeholder="电话">
                </div>
                <div class="col-sm-12 col-md-4 col-lg-2">
                    <select name="company_id" id="category" class="form-control">
                        <option value="">全部</option>
                        {volist name=":get_company_info()" id="vo"}
                        <option {eq name="$vo['id']" value="$Think.get.company_id"}selected{/eq}  value="{$vo.id}">{$vo.title}</option>
                        {/volist}
                    </select>
                </div>
                <div class="col-sm-12 col-md-4 col-lg-2">
                    <input type="text" class="form-control" name="start" value="{$Think.get.start}" placeholder="开始时间">
                </div>
                <div class="col-sm-12 col-md-4 col-lg-2">
                    <input type="text" class="form-control" name="end" value="{$Think.get.end}" placeholder="结束时间">
                </div>
                <div class="col-sm-12 col-md-4 col-lg-2" >
                    <select name="pay" id="category" class="form-control">
                        <option value="">全部</option>
                        {volist name=":config('pay')" id="vo"}
                        <option {eq name="$key" value="$Think.get.pay"}selected{/eq} value="{$key}">{$vo}</option>
                        {/volist}
                    </select>
                </div>
                <div class="col-sm-12 col-md-4 col-lg-2" >
                    <select name="buystatus"  class="form-control">
                        <option value="">全部</option>
                        <option {eq name="1" value="$Think.get.buystatus"}selected{/eq} value="1">待发货</option>
                        <option {eq name="2" value="$Think.get.buystatus"}selected{/eq} value="2">待配送</option>
                        <option {eq name="3" value="$Think.get.buystatus"}selected{/eq} value="3">待签收</option>
                        <option {eq name="4" value="$Think.get.buystatus"}selected{/eq} value="4">已完成</option>
                    </select>
                </div>
                <button class="btn btn-primary" type="submit">搜索</button>
            </form>

            <div class="pull-right">
              <button class="btn btn-primary ajax-post confirm" url="{:url('accept')}" target-form="ids">接 单</button>
            </div>

        </div>


        <div class="table-responsive">
            <table class="table table-striped table-hover">
                <thead>
                <tr>
                    <th width="30"><input class="checkbox check-all" type="checkbox"></th>
                    <th width="60">ID</th>
                    <th>微信名称</th>
                    <th>用户名</th>
                    <th>联系电话</th>
                    <th>所属单位</th>
                    <th>当日该单位编号</th>
                    <th>订单价格</th>
                    <th>下单时间</th>
                    <th>支付方式</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {volist name="list" id="item"}
                <tr>
                    <td><input class="ids row-selected" type="checkbox" name="ids[]" value="{$item['id']}"></td>
                    <td>{$item['id']}</td>
                    <td>{$item['nick_name']} </td>
                    <td>{$item['user_name']} </td>
                    <td>{$item['tel']}</td>
                    <td>{$item['company_id']|get_table_field="id","title","company"}</td>
                    <td>{$item['day_no']}</td>
                    <td>{$item['total']} </td>

                    <td>{$item['create_time']}</td>
                    <td>{$item['pay']|parse_config_value='pay'}</td>
                    <td>{$item['buystatus']|parse_config_value='pay_status'}</td>
                    <td>
                        <a href="{:url('edit',array('id'=>$item['id']))}">查看</a>
                        <a href="{:url('accept', ['id'=>$item['id']])}"  class="confirm ajax-get">接单</a>
                        {eq name=":session('user_auth.username')" value="admin"}<a href="{:url('del',array('id'=>$item['id']))}" class="confirm ajax-get">删除</a>{/eq}
                    </td>
                </tr>
                {/volist}
                </tbody>
            </table>
            {$list->render()}
        </div>
    </div>
</div>





<!-- datepicker statr -->
<link href="__PUBLIC__/plugs/datepicker/css/foundation-datepicker.min.css" rel="stylesheet" type="text/css">
<script src="__PUBLIC__/plugs/datepicker/js/foundation-datepicker.js"></script>
<script src="__PUBLIC__/plugs/datepicker/js/foundation-datepicker.zh-CN.js"></script>
<link rel="stylesheet" type="text/css" href="__PUBLIC__/plugs/board/board.min.css">
<!-- datepicker end -->
<script type="text/javascript">





</script>


{/block}
